-- GENERATED SPELL FOR [Speaker Mar'grom] --


function spell0_18693(pUnit, Event) --@Fire Ward,Self--
pUnit:FullCastSpellOnTarget(37844,pUnit)
pUnit:RegisterEvent('Sorts_18693', 30255, 1)
end

function spell1_18693(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(12466,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18693', 3000, 1)
end

function spell2_18693(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15497,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18693', 7000, 1)
end

function spell3_18693(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(15241,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18693', 1500, 1)
end

function Sorts_18693(pUnit, Event)
local choix_sorts_18693 = math.random(0, 3)
if choix_sorts_18693 == 0 then
pUnit:RegisterEvent('spell0_18693', 1, 1)
end
if choix_sorts_18693 == 1 then
pUnit:RegisterEvent('spell1_18693', 1, 1)
end
if choix_sorts_18693 == 2 then
pUnit:RegisterEvent('spell2_18693', 1, 1)
end
if choix_sorts_18693 == 3 then
pUnit:RegisterEvent('spell3_18693', 1, 1)
end
end

function mob18693_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18693', math.random(1500, 3000), 1)
end

function mob18693_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18693_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18693_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18693, 1, 'mob18693_Action')
RegisterUnitEvent(18693, 2, 'mob18693_Leave')
RegisterUnitEvent(18693, 3, 'mob18693_Kill')
RegisterUnitEvent(18693, 4, 'mob18693_Die')
